﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<AgriculturalMachinery.Models.ProductViewModel<AgriculturalMachinery.Models.ProductInfo>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	铁牛农机后台管理系统: 库存管理
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="operaAera">
    <div id="operaInfo" class="operaInfo" onclick="operaInfoClick();" onmousemove="operaInfoMouseMove();" onmouseout="operaInfoMouseOut();"></div>
    <div id="operaUsers" class="operaUsers" onclick="operaUsersClick();" onmousemove="operaUsersMouseMove();" onmouseout="operaUsersMouseOut();"></div>        
    <div id="operaStorage" class="operaStorage" onclick="operaStorageClick();" onmousemove="operaStorageMouseMove();" onmouseout="operaStorageMouseOut();"></div>
    <div id="operaQuit" class="operaAeraQuit" onclick="operaAeraQuit();"></div>
</div>
<div class="operaContent">
    <!-- Tabs -->
	<div id="tabs">
		<ul>
			<li><a href="#tabs-1">变速箱库存管理</a></li>
			<li id="#tabs-2" ><a href="#tabs-2" >发动机库存管理</a></li>
		</ul>
		<div id="tabs-1">
        <div class="operaContentDelChk" onclick="deleteAllGrarbox(0, 'ck');">删除选中</div><hr />
		<table class="operaContentTable">
            <tr class="operaContentTableTitle">
                <td><input type="checkbox" onclick="productSelectAll('ck');"/></td>
                <td>变速箱型号</td>
                <td>变速箱铭牌</td>
                <td>变速箱厂址</td>
                <td>变速箱日期</td>
                <td>变速箱余量</td>
                <td>变速箱价格</td>
                <td>点击删除</td>
            </tr>
            <%foreach (AgriculturalMachinery.Models.ProductInfo p in Model.PagedAllProducts) %>
            <%{ %>
            <%if (p.GearboxModel != null) %>
            <%{ %>
            <tr>
                <td><input type="checkbox"  class="ck" name="ck" id="<%=p.StorageID %>"/></td>
                <td><%=p.GearboxModel %></td>
                <td><%=p.GearboxNameplate %></td>
                <td><%=p.GearboxFactory %></td>
                <td><%=p.GearboxStockDate %></td>
                <td><%=p.GearboxMargin %></td>
                <td><%=p.GearboxPrice %></td>
                <td><a href="/product/delete/<%=p.StorageID %>">点击删除</a></td>
            </tr>
            <%} %>
            <%} %>
            <tr>
                <td></td>
                <td><input type="text" style="width:77px" id="gMode"/></td>
                <td><input type="text" style="width:77px" id="gNP"/></td>
                <td><input type="text" style="width:77px" id="gF"/></td>
                <td><input type="text" style="width:77px" id="gSD"/></td>
                <td><input type="text" style="width:77px" id="gM"/></td>
                <td><input type="text" style="width:77px" id="gP"/></td>
                <td><div onclick="addGearbox(gMode.value, gNP.value, gF.value, gSD.value, gM.value, gP.value);">添加</div></td>
            </tr>
        </table>
        </div>
		<div id="tabs-2">
		<div class="operaContentDelChk" onclick="deleteAllEngine(0, 'ck1');">删除选中</div><hr />
		    <table class="operaContentTable">
                <tr class="operaContentTableTitle">
                    <td><input type="checkbox" onclick="productSelectAll('ck1');"/></td>
                    <td>发动机型号</td>
                    <td>发动机铭牌</td>
                    <td>发动机厂址</td>
                    <td>发动机日期</td>
                    <td>发动机余量</td>
                    <td>发动机价格</td>
                    <td>点击删除</td>
                </tr>
                <%foreach (AgriculturalMachinery.Models.ProductInfo p1 in Model.PagedAllProducts) %>
                <%{ %>
                    <%if (p1.EngineModel != null) %>
                    <%{ %>
                        <tr>
                            <td><input type="checkbox" class="ck1" name="ck1" id="<%=p1.StorageID %>"/></td>
                            <td><%=p1.EngineModel %></td>
                            <td><%=p1.EngineNameplate %></td>
                            <td><%=p1.EngineFactory %></td>
                            <td><%=p1.EngineSotckDate %></td>
                            <td><%=p1.EngineMargin %></td>
                            <td><%=p1.EnginePrice %></td>
                            <td><a href="/product/delete/<%=p1.StorageID %>">点击删除</a></td>
                        </tr>
                    <%} %>
                <%} %>
                <tr>
                    <td></td>
                    <td><input type="text" style="width:77px" id="eMode"/></td>
                    <td><input type="text" style="width:77px" id="eNP"/></td>
                    <td><input type="text" style="width:77px" id="eF"/></td>
                    <td><input type="text" style="width:77px" id="eSD"/></td>
                    <td><input type="text" style="width:77px" id="eM"/></td>
                    <td><input type="text" style="width:77px" id="eP"/></td>
                    <td><div onclick="addEngine(eMode.value, eNP.value, eF.value, eSD.value, eM.value, eP.value);">添加</div></td>
                 </tr>
            </table>
		</div>
	</div>
</div>
<script type="text/javascript" src="../../Scripts/ProductManager.js"></script>
</asp:Content>
